package net.sppan.base.service.impl;

import net.sppan.base.dao.IMgUserCodeDao;
import net.sppan.base.dao.support.IBaseDao;
import net.sppan.base.entity.mgEntity.MgUserCode;
import net.sppan.base.service.IMgUserCodeService;
import net.sppan.base.service.support.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户账户表  服务实现类
 * </p>
 *
 * @author SPPan
 * @since 2016-12-28
 */
@Service
public class MgUserCodeServiceImpl extends BaseServiceImpl<MgUserCode, Integer> implements IMgUserCodeService {

	@Autowired
	private IMgUserCodeDao MgUserCodeDao;
	

	@Override
	public IBaseDao<MgUserCode, Integer> getBaseDao() {
		return this.MgUserCodeDao;
	}


	@Override
	public MgUserCode findByUserName(String username) {
		return null;
	}

	@Override
	public MgUserCode findByTelephone(String telephone) {
		MgUserCode MgUserCode = MgUserCodeDao.findByTelephone(telephone);
		return MgUserCode;
	}

	@Override
	public MgUserCode findByTelephoneAndCodeType(String telephone, String type) {
		return MgUserCodeDao.findByTelephoneAndCodeType(telephone,type);
	}

	@Override
	public MgUserCode findByCode(String code) {
		return	MgUserCodeDao.findByCode(code);
	}

	@Override
	public MgUserCode findByCodeStatusAndCodeType(String codeStatus, String codeType) {
		return MgUserCodeDao.findByCodeStatusAndCodeType(codeStatus,codeType);
	}

	@Override
	public void saveOrUpdate(MgUserCode user) {

	}

	@Override
	public Page<MgUserCode> findAllByLike(String searchText, PageRequest pageRequest) {
		return null;
	}

}
